<!-- register.html -->
{% load static %}

<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>智能家居中控台 - 注册</title>
    <link rel="stylesheet" type="text/css" href="{% static 'css/login.css' %}">
</head>
<body>
    <div class="login-container">
        <h2>用户注册</h2>
        {% if error %}
            <p class="error">{{ error }}</p>
        {% endif %}
        <form method="post">
            {% csrf_token %}
            <label for="username">用户名:</label>
            <input type="text" id="username" name="username" required>
            <label for="password1">密码:</label>
            <input type="password" id="password1" name="password1" required>
            <label for="password2">确认密码:</label>
            <input type="password" id="password2" name="password2" required>
            <button type="submit">注册</button>
        </form>
        <p>已有账号？<a href="{% url 'login' %}">立即登录</a></p>
    </div>
</body>
</html>
